import request from '@/utils/request'

// 查询模板与规格属性的关联列表
export function listProductSpecTemplateRelation(query) {
  return request({
    url: '/product/productSpecTemplateRelation/list',
    method: 'get',
    params: query
  })
}

// 查询模板与规格属性的关联详细
export function getProductSpecTemplateRelation(id) {
  return request({
    url: '/product/productSpecTemplateRelation/' + id,
    method: 'get'
  })
}

// 新增模板与规格属性的关联
export function addProductSpecTemplateRelation(data) {
  return request({
    url: '/product/productSpecTemplateRelation',
    method: 'post',
    data: data
  })
}

// 修改模板与规格属性的关联
export function updateProductSpecTemplateRelation(data) {
  return request({
    url: '/product/productSpecTemplateRelation',
    method: 'put',
    data: data
  })
}

// 删除模板与规格属性的关联
export function delProductSpecTemplateRelation(id) {
  return request({
    url: '/product/productSpecTemplateRelation/' + id,
    method: 'delete'
  })
}
